<template>
	<div>
		<Test />
		<button @click="change">父组件修改信息</button>
	</div>
</template>

<script setup lang="ts">
import { reactive, provide } from 'vue'
import Test from './test.vue'
const userInfo = reactive({
	name: 'deng',
	age: 20,
})
provide('userInfo', userInfo)
const change = () => {
	userInfo.name = '父组件修改'
	userInfo.age = 20
}
</script>
